import fetch from 'common/src/utils/fetch';

/**
 *获取列表
 */
function getListPage(data) {
  return fetch({
    url: '/api/electionservice/undergraduateExamCollege/getListPage',
    method: 'post',
    data
  })
}

/**
 *排考要求设置
 */
function requirements(data) {
  return fetch({
    url: '/api/electionservice/undergraduateExamCollege/batchRequirements',
    method: 'post',
    data
  })
}

/**
 *标记自排
 */
function mark(data) {
  return fetch({
    url: '/api/electionservice/undergraduateExamCollege/mark',
    method: 'post',
    data
  })
}

/**
 *取消标记自排
 */
function unmark(data) {
  return fetch({
    url: '/api/electionservice/undergraduateExamCollege/unmark',
    method: 'delete',
    data
  })
}

/**
 * 导出
 * @param {Object} data
 */
export function deptSchedulingExport(data) {
  return fetch({
    url: '/api/electionservice/undergraduateExamCollege/export',
    method: 'post',
    data
  })
}

/**
 * 获取key
 */
function exportStatus(key) {
  return fetch({
    url: '/api/electionservice/undergraduateExamCollege/result/' + key,
    method: 'get'
  });
}


export default {
  getListPage: getListPage,
  requirements:requirements,
  unmark:unmark,
  mark:mark,
  deptSchedulingExport:deptSchedulingExport,
  exportStatus:exportStatus
};
